﻿
<div class="row-content am-cf" ng-controller="borrowerEditController">

    <div class="row">

        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-fl">编辑借阅人信息</div>
                    <div class="widget-function am-fr">
                        <a href="javascript:;" class="am-icon-cog"></a>
                    </div>
                </div>
                <div class="widget-body am-fr">

                    <form class="am-form tpl-form-line-form" name="editForm" novalidate>
                        <div class="am-form-group" ng-class="{ 'am-form-error': editForm.borrower_name.$invalid }">
                            <!--ng-class="{ 'am-form-error': editForm.borrower_name.$invalid && !editForm.borrower_name.$pristine }"-->
                            <label for="borrower_name" class="am-u-sm-3 am-form-label"><span style="color:red;">*</span>姓名 <span class="tpl-form-line-small-title">Name</span></label>
                            <div class="am-u-sm-9">
                                <input type="text" class="tpl-form-input am-form-field" name="borrower_name" placeholder="请输入借阅人姓名" ng-model="model.borrowerName" required ng-maxlength="10" ng-minlength="1">
                                <small>请填写1到10个之间的字符。</small>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <label for="user-email" class="am-u-sm-3 am-form-label">性别 <span class="tpl-form-line-small-title">Gender</span></label>
                            <div class="am-u-sm-9">
                                <input type="radio" class="am-radio-inline" checked="checked" name="gender" ng-value="2" ng-model="model.gender"> 男
                                <input type="radio" class="am-radio-inline" name="gender" ng-value="1" ng-model="model.gender"> 女
                            </div>
                        </div>

                        <div class="am-form-group" ng-class="{ 'am-form-error': editForm.mobilephone.$invalid }">
                            <label for="user-phone" class="am-u-sm-3 am-form-label">手机号 <span class="tpl-form-line-small-title">Mobilephone</span></label>
                            <div class="am-u-sm-9">

                                <input type="text" class="tpl-form-input am-form-field" placeholder="请输入借阅人手机号" name="mobilephone" ng-model="model.cellphone" ng-maxlength="20">
                                <small ng-if="editForm.mobilephone.$invalid">请填写20个以内的字符。</small>

                            </div>
                        </div>

                        <div class="am-form-group" ng-class="{ 'am-form-error': editForm.email.$invalid }">
                            <label class="am-u-sm-3 am-form-label">邮箱 <span class="tpl-form-line-small-title">Email</span></label>
                            <div class="am-u-sm-9">
                                <input type="email" class="tpl-form-input am-form-field" placeholder="输入借阅人邮箱" ng-model="model.email" name="email" ng-maxlength="20">
                                <small ng-if="editForm.email.$invalid">请填写正确格式的邮箱，允许20个以内的字符。</small>
                            </div>
                        </div>

                        <div class="am-form-group" ng-class="{ 'am-form-error': editForm.relationship.$invalid }">
                            <label class="am-u-sm-3 am-form-label">家庭关系 <span class="tpl-form-line-small-title">Relationship</span></label>
                            <div class="am-u-sm-9">
                                <input type="text" class="tpl-form-input am-form-field" placeholder="输入与借阅人之间的关系" name="relationship" ng-model="model.relationship" ng-maxlength="10">
                                <small ng-if="editForm.relationship.$invalid">请填写10个以内的字符。</small>
                            </div>
                        </div>

                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-form-label">诚信记录 <span class="tpl-form-line-small-title">Credit</span></label>
                            <div class="am-u-sm-9">
                                <input type="radio" class="am-radio-inline" checked="checked" name="returnintime" ng-model="model.record" ng-value="1"> 及时归还
                                <input type="radio" class="am-radio-inline" name="returnintime" ng-model="model.record" ng-value="2"> 延迟归还
                            </div>
                        </div>

                        <div class="am-form-group">
                            <div class="am-u-sm-9 am-u-sm-push-3">
                                <button type="button" class="am-btn am-btn-primary tpl-btn-bg-color-success " ng-click="save()" ng-disabled="editForm.$invalid">提交</button>
                                <button type="button" class="am-btn am-btn-default" ng-click="back()">返回</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

</div>
